import { homeBanner } from "../apis/index.js";


class Banner {
	
    static async getHomeBanner() {
	   return homeBanner({
			imagetype: 'indextop'
	   })
    }
	
	static async getLeisurelyBanner() {
	   return homeBanner({
			imagetype: 'secondscripttop'
	   })
	}
	
	
	
	static gotoTarget(banner) {
		console.log(banner);
		let type = ''
	    switch (banner.jumptype) {
			case '1':
				wx.navigateToMiniProgram({
				  appId: 'gh_165392699661',
				})
				break
			case '2':
				wx.navigateToMiniProgram({
				  appId: 'gh_accca55511c3',
				})
				break
			default:
				type = 'web'
				break
	    }
		return type
	}

}

export {
    Banner
}